/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jollylengkono.skripsi.KnowledgeBases.action;

import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jollylengkono.skripsi.dao.KnowledgeBasesDao;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author Nicholai
 */
public class KnowledgeBasesGetList extends Action {

    public KnowledgeBasesGetList() {
    }
    
    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        List knowledgeBases = new ArrayList();
        knowledgeBases = new KnowledgeBasesDao().getList();
        request.setAttribute("knowledgeBases", knowledgeBases);
        return mapping.findForward("success");
    }
}
